package ${cfg.packageName}.mapper;

import ${cfg.packageName}.model.entity.${entity};
import ${cfg.packageName}.model.dto.${entity}SaveDTO;
import ${cfg.packageName}.model.dto.${entity}DTO;
import ${cfg.packageName}.model.vo.${entity}VO;
import ${cfg.packageName}.model.bo.${entity}BO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


/**
 * <p>
 * ${table.comment!} Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
<#if kotlin>
interface ${table.mapperName} : ${superMapperClass}<${entity}>
<#else>
@Mapper
public interface ${entity}Mapper {

    int insertBatch${entity}(List<${entity}SaveDTO> ${table.entityPath}SaveDTO);

    List<${entity}> get${entity}List(${entity}DTO ${table.entityPath}DTO);

    ${entity}BO select${entity}ById(<#list table.fields as field><#if field.keyFlag>${field.propertyType} ${field.propertyName}</#if></#list>);

    int delete${entity}ById(<#list table.fields as field><#if field.keyFlag>${field.propertyType} ${field.propertyName}</#if></#list>);

    int update${entity}ById(<#list table.fields as field><#if field.keyFlag>${field.propertyType} ${field.propertyName}</#if></#list>);

}
</#if>
